<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>作业2</title>
</head>
<body>
<script>
    let n = Math.floor(Math.random() * 100 + 1);
    let m = Math.floor(Math.random() * 100 + 1);
    document.write(n + "<br>");
    document.write(m + "<br>");
    let str = "";

    function print(n, m) {
        for (let i = 0; i < n; i++) {
            for (let j = 0; j < m; j++) {
                str += "*";
            }
            str += "<br>";
        }
        document.write(str);
    }

    print(n, m);

</script>
</body>
</html>